<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%customer_login}}".
 *
 * @property string $logid 编号，自增，主键
 * @property int $customer_id 客户编号
 * @property string $telephone 客户手机号
 * @property string $email 客户邮箱
 * @property string $firstname 客户邮箱
 * @property string $token 登录历史令牌
 * @property string $ip 登录历史令牌
 * @property string $explorer 登录历史令牌
 * @property int $ctime 登录时间
 */
class CustomerLogin extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%customer_login}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['customer_id', 'ctime'], 'integer'],
            [['telephone', 'firstname'], 'string', 'max' => 32],
            [['email'], 'string', 'max' => 96],
            [['token'], 'string', 'max' => 200],
            [['ip'], 'string', 'max' => 50],
            [['explorer'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'logid' => Yii::t('app', 'Logid'),
            'customer_id' => Yii::t('app', 'Customer ID'),
            'telephone' => Yii::t('app', 'Telephone'),
            'email' => Yii::t('app', 'Email'),
            'firstname' => Yii::t('app', 'Firstname'),
            'token' => Yii::t('app', 'Token'),
            'ip' => Yii::t('app', 'Ip'),
            'explorer' => Yii::t('app', 'Explorer'),
            'ctime' => Yii::t('app', 'Ctime'),
        ];
    }
}
